home *** CD-ROM | disk | FTP | other *** search
- /*
- -- ANSI C code generated by :
- -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82) --
- -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
- -- Dominique COLNET and Suzanne COLLIN - colnet@loria.fr --
- -- http://www.loria.fr/SmallEiffel --
- */
- #include "compile_to_c.h"
- void r798c_dicho(int C,T0* a1,int a2,int a3){
- T0* _dyn_rf=NULL;
- T0* _dyn_rc=NULL;
- int _m=0;
- /*IF*/if ((a2)==(a3)) {
- _dyn_rc=r396item(((T396*)(oBC798running)),a2);
- _dyn_rf=r355dynamic(((T355*)_dyn_rc),a1);
- r798tail_opening(/*X496*/((T0*)(((T832*)((T832*)a1)))->_result_type/*24*/),/*X496*/((T0*)(((T832*)((T832*)_dyn_rf)))->_result_type/*24*/));
- r324push_switch(((T324*)(oBC364cpp)),_dyn_rf,a1);
- X496mapping_c(_dyn_rf);
- r324pop(((T324*)(oBC364cpp)));
- r798tail_closing(/*X496*/((T0*)(((T832*)((T832*)a1)))->_result_type/*24*/),/*X496*/((T0*)(((T832*)((T832*)_dyn_rf)))->_result_type/*24*/));
- }
- else {
- _m=((a2)+(a3))/(2);
- _dyn_rc=r396item(((T396*)(oBC798running)),_m);
- /*[IRF3.5put_string*/r544put_string(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),((T0*)ms8_798));
- /*]*/
- /*[IRF3.5put_integer*/r544put_integer(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),(((T355*)((T355*)_dyn_rc)))->_id/*4*/);
- /*]*/
- /*[IRF3.5put_string*/r544put_string(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),((T0*)ms9_798));
- /*]*/
- r798c_dicho(C,a1,a2,_m);
- /*[IRF3.5put_string*/r544put_string(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),((T0*)ms10_798));
- /*]*/
- r798c_dicho(C,a1,(_m)+(1),a3);
- /*[IRF3.5put_character*//*[IRF3.6put_character*/{T544* C1=((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/));
- char b1='\175';
- putc(b1,((FILE*)((((T544*)C1))->_output_stream/*4*/)));
- }/*]*/
- /*]*/
- }
- /*FI*/}
- void r798put_arguments(T0* a1,T0* a2){
- int _up=0;
- int _i=0;
- _i=1;
- _up=/*(IRF4.6count*/(((T65*)((T65*)((((T31*)((T31*)a2)))->_flat_list/*12*/))))->_upper/*12*//*)*/;
- while (!((_i)>(_up))) {
- /*IF*/if ((_i)>(1)) {
- /*[IRF3.5put_character*//*[IRF3.6put_character*/{T544* C1=((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/));
- char b1='\54';
- putc(b1,((FILE*)((((T544*)C1))->_output_stream/*4*/)));
- }/*]*/
- /*]*/
- }
- /*FI*/r798put_ith_argument(a1,a2,_i);
- _i=(_i)+(1);
- }
- }
- /*No:SWITCH.fz_void*/
- /*No:ASSERTION.fz_is_not_boolean*/
- /*No:ASSERTION.fz_bad_assertion*/
- void r348make(T348* C,T0* a1,T0* a2,T0* a3){
- C->_tag=a1;
- C->_expression=a2;
- C->_comment=a3;
- }
- /*No:ASSERTION.expression*/
- T0* r348start_position(T348* C){
- T0* R=NULL;
- /*IF*/if (((((T348*)C))->_tag/*0*/)!=((void*)(NULL))) {
- R=(((T490*)((T490*)((((T348*)C))->_tag/*0*/))))->_start_position/*4*/;
- }
- else if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
- R=X662start_position((((T348*)C))->_expression/*4*/);
- }
- else {
- R=(((T393*)((T393*)((((T348*)C))->_comment/*8*/))))->_start_position/*0*/;
- }
- /*FI*/return R;
- }
- void r348compile_to_c(T348* C){
- /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
- r324check_assertion(((T324*)(oBC364cpp)),(((T348*)C))->_expression/*4*/);
- }
- /*FI*/}
- /*No:ASSERTION.comment*/
- T0* r348to_runnable(T348* C,T0* a1){
- T0* R=NULL;
- T0* _e=NULL;
- /*IF*/if (((((T348*)C))->_current_type/*12*/)==((void*)(NULL))) {
- C->_current_type=a1;
- R=(T0*)C;
- /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
- _e=X662to_runnable((((T348*)C))->_expression/*4*/,a1);
- /*IF*/if ((_e)==((void*)(NULL))) {
- r348error(r348start_position(C),((T0*)ms57_470));
- }
- else {
- C->_expression=_e;
- /*IF*/if (!(X291is_boolean(X662result_type((((T348*)C))->_expression/*4*/)))) {
- r683add_type(X662result_type((((T348*)C))->_expression/*4*/),((T0*)ms73_470));
- r348error(r348start_position(C),((T0*)ms57_470));
- }
- /*FI*/}
- /*FI*/}
- /*FI*/}
- else {
- {T348*n=malloc(sizeof(*n));
- *n=M348;
- r348make(n,(((T348*)C))->_tag/*0*/,(((T348*)C))->_expression/*4*/,(((T348*)C))->_comment/*8*/);
- R=(T0*)n;
- }
- R=r348to_runnable(((T348*)R),a1);
- }
- /*FI*/return R;
- }
- /*No:ASSERTION.tag*/
- /*No:ASSERTION.current_type*/
- void r348compile_to_c_old(T348* C){
- /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
- X662compile_to_c_old((((T348*)C))->_expression/*4*/);
- }
- /*FI*/}
- int r348is_pre_computable(T348* C){
- int R=0;
- /*IF*/if (((((T348*)C))->_expression/*4*/)==((void*)(NULL))) {
- R=1;
- }
- else {
- R=X662is_pre_computable((((T348*)C))->_expression/*4*/);
- }
- /*FI*/return R;
- }
- int r348use_current(T348* C){
- int R=0;
- /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
- R=X662use_current((((T348*)C))->_expression/*4*/);
- }
- /*FI*/return R;
- }
- void r348error(T0* a1,T0* a2){
- r683add_position(a1);
- r683error(((T683*)(oBC364eh)),a2);
- }
- void r348afd_check(T348* C){
- /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
- X662afd_check((((T348*)C))->_expression/*4*/);
- }
- /*FI*/}
-
-